package networking;

import java.io.*;
import java.net.*;

public class MinimalServer {

	public static void main(String[] args) {
		ServerSocket socket = null;
		try {
			socket = new ServerSocket(5532);
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		while(true){
			try {
				Socket s1 = socket.accept();
				OutputStream s1out = s1.getOutputStream();
				BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(s1out));
				bw.write("Hello World!\n");
				bw.close();
				s1.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}

}
